package cn.com.gainfo.recks.business.systemSet;

import java.util.List;

import javax.sql.DataSource;

import cn.com.gainfo.recks.dao.systemSet.FunctionDAO;
import cn.com.gainfo.recks.dao.systemSet.LogDAO;
import cn.yzyue.base.business.AbstractBusiness;
import cn.yzyue.base.vo.VO;

public class FunctionBusiness extends AbstractBusiness{

	private FunctionDAO  dao =null;
	
	public FunctionBusiness() {
		dao=new FunctionDAO();
	}
	
	@Override
	public boolean add(DataSource dataSource, VO vo) {
		// TODO Auto-generated method stub
		return dao.add(dataSource, vo);
	}

	@Override
	public boolean batchDel(DataSource dataSource, VO vo, List data) {
		// TODO Auto-generated method stub
		return dao.batchDel(dataSource, vo, data);
	}

	@Override
	public boolean del(DataSource dataSource, VO vo, String[] ids) {
		// TODO Auto-generated method stub
		return dao.del(dataSource, vo, ids);
	}

	@Override
	public List find(DataSource dataSource, VO vo, int page) {
		// TODO Auto-generated method stub
		return dao.find(dataSource, vo, page);
	}

	@Override
	public VO findByIds(DataSource dataSource, VO vo, String[] ids) {
		// TODO Auto-generated method stub
		return dao.findByIds(dataSource, vo, ids);
	}

	@Override
	public boolean mod(DataSource dataSource, VO vo) {
		// TODO Auto-generated method stub
		return dao.mod(dataSource, vo);
	}
	
	
	public String  getFunctionSql(){
		String sql = " select  id  ,  name   from  function  ";
		return sql;		
	}
	
	
	public String  getCountFunctionSql(){
		String sql = " select  count(id)  from  function  ";
		return sql;		
	}
	
	
	 public String  getFunctionNameSql(String name){
		 String sql = "select id from auth where name='"+name+"'";
		 return sql;
	 }
	 
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
